package com.varian.system.vo;

import com.varian.tool.model.BaseVO;
import com.varian.tool.tree.INode;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

/**
 * @author ben
 * @since 2024/11/19
 */
@Data
@Schema(title = "部门树形视图对象")
public class SysDeptTreeVO extends BaseVO implements INode<SysDeptTreeVO> {
    @Schema(title = "父级部门")
    private Long parentId;
    @Schema(title = "部门名称")
    private String deptName;
    @Schema(title = "部门编码")
    private String deptCode;
    @Schema(title = "排序")
    private Integer deptWeight;
    @Schema(title = "层级")
    private Integer deptLevel;
    @Schema(title = "状态")
    private Integer deptStatus;
    @Schema(title = "下级部门")
    private List<SysDeptTreeVO> children;

    @Override
    public Comparable<?> weight() {
        return deptWeight;
    }
}
